/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2019-2019.
 * Description: support for hi56t1t
 * Author: yanbo <joey.yanbo@huawei.com>
 * Create: 2019-08-11
 */
#include <linux/hal32/hal_reserved_memory_map.h>
#include <asm/proc-fns.h>
#include <mach/hi5651t.h>

void set_switch_mm_for_hi5651t(void)
{
	int *p_hi5651_magic = (int *)(PAGE_OFFSET + HI5651T_MAGIC_OFFSET);

#ifdef CONFIG_RANDOMIZE_BASE
	p_hi5651_magic = (int *)((unsigned char *)p_hi5651_magic + kaslr_offset());
#endif
	if ((*p_hi5651_magic) == HI5651T_MAGIC) {
		processor.switch_mm = cpu_hi5651t_switch_mm;
		hi5651t_add_outer_shareable = 1;
	}
}
